﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace EFEntity
{
     public  class MyDbContext: DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=HRDB;Integrated Security=True");
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            //职位设置
            var ad = modelBuilder.Entity<config_major>();
            ad.ToTable("config_major");
            ad.Property(e => e.major_kind_id).HasMaxLength(2);
            ad.Property(e => e.major_kind_name).HasMaxLength(60);
            ad.Property(e => e.major_id).HasMaxLength(2);
            ad.Property(e => e.major_name).HasMaxLength(60);
            ad.Property(e => e.test_amount);
            //职位分类设置
            var ebj = modelBuilder.Entity<config_major_kind>();
            ebj.ToTable("config_major_kind");
            ebj.Property(e => e.major_kind_id).HasMaxLength(2);
            ebj.Property(e => e.major_kind_name).HasMaxLength(60);

            var user = modelBuilder.Entity<users>();
            user.ToTable("user");
            user.Property(e => e.user_name).IsRequired();
            user.Property(e => e.user_true_name).IsRequired();
            user.Property(e => e.user_password).IsRequired();

            var one = modelBuilder.Entity<Econfig_file_first_kind>();
            one.ToTable("config_file_first_kind");
            one.Property(e => e.first_kind_id).HasMaxLength(2);
            one.Property(e => e.first_kind_name).HasMaxLength(20);
            one.Property(e => e.first_kind_salary_id).HasMaxLength(20);
            one.Property(e => e.first_kind_sale_id).HasMaxLength(20);

            var two = modelBuilder.Entity<Econfig_file_second_kind>();
            two.ToTable("config_file_second_kind");
            two.Property(e => e.first_kind_id).HasMaxLength(2);
            two.Property(e => e.first_kind_name).HasMaxLength(20);
            two.Property(e => e.second_kind_id).HasMaxLength(2);
            two.Property(e => e.second_kind_name).HasMaxLength(20);
            two.Property(e => e.second_salary_id).HasMaxLength(20);
            two.Property(e => e.second_sale_id).HasMaxLength(20);

            var three = modelBuilder.Entity<Econfig_file_third_kind>();
            three.ToTable("config_file_third_kind");
            three.Property(e => e.first_kind_id).HasMaxLength(2);
            three.Property(e => e.first_kind_name).HasMaxLength(20);
            three.Property(e => e.second_kind_id).HasMaxLength(2);
            three.Property(e => e.second_kind_name).HasMaxLength(20);
            three.Property(e => e.third_kind_id).HasMaxLength(2);
            three.Property(e => e.third_kind_name).HasMaxLength(20);
            three.Property(e => e.third_kind_sale_id).HasMaxLength(20);
            three.Property(e => e.third_kind_is_retail).HasMaxLength(20);
            //试题一级分类设置   
            var econfig_question_first_kind = modelBuilder.Entity<Econfig_question_first_kind>();
            econfig_question_first_kind.ToTable("config_question_first_kind");
            econfig_question_first_kind.Property(e => e.first_kind_id).HasMaxLength(60);
            econfig_question_first_kind.Property(e => e.first_kind_name).HasMaxLength(60);

            //试题二级分类设置 
            var econfig_question_second_kind = modelBuilder.Entity<Econfig_question_second_kind>();
            econfig_question_second_kind.ToTable("config_question_second_kind");
            econfig_question_second_kind.Property(e => e.first_kind_id).HasMaxLength(60);
            econfig_question_second_kind.Property(e => e.first_kind_name).HasMaxLength(60);
            econfig_question_second_kind.Property(e => e.second_kind_id).HasMaxLength(60);
            econfig_question_second_kind.Property(e => e.second_kind_name).HasMaxLength(60);

        

            //关键字设置，包括人力资源管理，薪酬发放，激励管理，调动管理，薪酬标准，培训 
            var econfig_primary_key = modelBuilder.Entity<Econfig_primary_key>();
            econfig_primary_key.ToTable("config_primary_key");
            econfig_primary_key.Property(e => e.primary_key_table).HasMaxLength(60);
            econfig_primary_key.Property(e => e.primary_key).HasMaxLength(60);
            econfig_primary_key.Property(e => e.key_name).HasMaxLength(60);
            econfig_primary_key.Property(e => e.primary_key_status).HasMaxLength(60);
            //公共属性设置
            var gg = modelBuilder.Entity<config_public_char>();
            gg.ToTable("config_public_char");
            gg.Property(e => e.attribute_kind).HasMaxLength(60);
            gg.Property(e => e.attribute_name).HasMaxLength(60);
            //薪酬项目设置
            var xc = modelBuilder.Entity<salary_standard_details>();
            xc.ToTable("salary_standard_details");
            xc.Property(e => e.standard_id).HasMaxLength(30);
            xc.Property(e => e.standard_name).HasMaxLength(60);
            xc.Property(e => e.item_id);
            xc.Property(e => e.item_name).HasMaxLength(60);
            xc.Property(e => e.salary);
            //职称名称
            var zz = modelBuilder.Entity<config_kind>();
            zz.ToTable("config_kind");
            //记录人力资源档案所做的任何更改
            var eHumanFile_dig = modelBuilder.Entity<EHumanFile_dig>();
            eHumanFile_dig.ToTable("HumanFile_dig");
            eHumanFile_dig.Property(e => e.human_id).HasMaxLength(30);
            eHumanFile_dig.Property(e => e.first_kind_id).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.first_kind_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.second_kind_id).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.second_kind_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.third_kind_id).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.third_kind_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_address).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_postcode).HasMaxLength(10);
            eHumanFile_dig.Property(e => e.human_pro_designation).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_major_kind_id).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_major_kind_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_major_id).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.hunma_major_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_telephone).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_mobilephone).HasMaxLength(11);
            eHumanFile_dig.Property(e => e.human_bank).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_account).HasMaxLength(30);
            eHumanFile_dig.Property(e => e.human_qq).HasMaxLength(15);
            eHumanFile_dig.Property(e => e.human_email).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_hobby).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_speciality).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_sex).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_religion).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_party).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_nationality).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_race).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_birthday);
            eHumanFile_dig.Property(e => e.human_birthplace).HasMaxLength(50);
            eHumanFile_dig.Property(e => e.human_age).HasMaxLength(10);
            eHumanFile_dig.Property(e => e.human_educated_degree).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_educated_years).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_educated_major).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_society_security_id).HasMaxLength(30);
            eHumanFile_dig.Property(e => e.human_id_card).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.remark).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.salary_standard_id).HasMaxLength(30);
            eHumanFile_dig.Property(e => e.salary_standard_name).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.salary_sum).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.demand_salaray_sum).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.major_change_amount).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.bonus_amount).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.training_amount).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.file_chang_amount).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.human_histroy_records).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_family_membership).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.human_picture).HasMaxLength(255);
            eHumanFile_dig.Property(e => e.attachment_name).HasMaxLength(255);
            eHumanFile_dig.Property(e => e.check_status).HasMaxLength(20);
            eHumanFile_dig.Property(e => e.register).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.checker).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.changer).HasMaxLength(60);
            eHumanFile_dig.Property(e => e.regist_time);
            eHumanFile_dig.Property(e => e.check_time);
            eHumanFile_dig.Property(e => e.change_time);
            eHumanFile_dig.Property(e => e.lastly_change_time);
            eHumanFile_dig.Property(e => e.delete_time);
            eHumanFile_dig.Property(e => e.recovery_time);
            eHumanFile_dig.Property(e => e.human_file_status).HasMaxLength(20);

            //人力资源档案
            var eEhuman_file = modelBuilder.Entity<Ehuman_file>();
            eEhuman_file.ToTable("human_file");
            eEhuman_file.Property(e => e.human_id).HasMaxLength(30);
            eEhuman_file.Property(e => e.first_kind_id).HasMaxLength(60);
            eEhuman_file.Property(e => e.first_kind_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.second_kind_id).HasMaxLength(60);
            eEhuman_file.Property(e => e.second_kind_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.third_kind_id).HasMaxLength(60);
            eEhuman_file.Property(e => e.third_kind_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_address).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_postcode).HasMaxLength(10);
            eEhuman_file.Property(e => e.human_pro_designation).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_major_kind_id).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_major_kind_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_major_id).HasMaxLength(60);
            eEhuman_file.Property(e => e.hunma_major_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_telephone).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_mobilephone).HasMaxLength(11);
            eEhuman_file.Property(e => e.human_bank).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_account).HasMaxLength(30);
            eEhuman_file.Property(e => e.human_qq).HasMaxLength(15);
            eEhuman_file.Property(e => e.human_email).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_hobby).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_speciality).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_sex).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_religion).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_party).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_nationality).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_race).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_birthday);
            eEhuman_file.Property(e => e.human_birthplace).HasMaxLength(50);
            eEhuman_file.Property(e => e.human_age).HasMaxLength(10);
            eEhuman_file.Property(e => e.human_educated_degree).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_educated_years).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_educated_major).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_society_security_id).HasMaxLength(30);
            eEhuman_file.Property(e => e.human_id_card).HasMaxLength(20);
            eEhuman_file.Property(e => e.remark).HasMaxLength(60);
            eEhuman_file.Property(e => e.salary_standard_id).HasMaxLength(30);
            eEhuman_file.Property(e => e.salary_standard_name).HasMaxLength(60);
            eEhuman_file.Property(e => e.salary_sum).HasMaxLength(20);
            eEhuman_file.Property(e => e.demand_salaray_sum).HasMaxLength(20);
            eEhuman_file.Property(e => e.major_change_amount).HasMaxLength(20);
            eEhuman_file.Property(e => e.bonus_amount).HasMaxLength(20);
            eEhuman_file.Property(e => e.training_amount).HasMaxLength(20);
            eEhuman_file.Property(e => e.file_chang_amount).HasMaxLength(20);
            eEhuman_file.Property(e => e.human_histroy_records).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_family_membership).HasMaxLength(60);
            eEhuman_file.Property(e => e.human_picture).HasMaxLength(255);
            eEhuman_file.Property(e => e.attachment_name).HasMaxLength(255);
            eEhuman_file.Property(e => e.check_status).HasMaxLength(20);
            eEhuman_file.Property(e => e.register).HasMaxLength(60);
            eEhuman_file.Property(e => e.checker).HasMaxLength(60);
            eEhuman_file.Property(e => e.changer).HasMaxLength(60);
            eEhuman_file.Property(e => e.regist_time);
            eEhuman_file.Property(e => e.check_time);
            eEhuman_file.Property(e => e.change_time);
            eEhuman_file.Property(e => e.lastly_change_time);
            eEhuman_file.Property(e => e.delete_time);
            eEhuman_file.Property(e => e.recovery_time);
            eEhuman_file.Property(e => e.human_file_status).HasMaxLength(20);

          

            //薪酬标准基本信息表
            var esalary_standard = modelBuilder.Entity<Esalary_standard>();
            esalary_standard.ToTable("salary_standard");
            esalary_standard.Property(e => e.standard_id).HasMaxLength(30);
            esalary_standard.Property(e => e.standard_name).HasMaxLength(60);
            esalary_standard.Property(e => e.designer).HasMaxLength(60);
            esalary_standard.Property(e => e.register).HasMaxLength(60);
            esalary_standard.Property(e => e.checker).HasMaxLength(60);
            esalary_standard.Property(e => e.changer).HasMaxLength(60);
            esalary_standard.Property(e => e.regist_time);
            esalary_standard.Property(e => e.check_time);
            esalary_standard.Property(e => e.change_time);
            esalary_standard.Property(e => e.salary_sum);
            esalary_standard.Property(e => e.check_status).HasMaxLength(20);
            esalary_standard.Property(e => e.change_status).HasMaxLength(20);
            esalary_standard.Property(e => e.check_comment).HasMaxLength(60);
            esalary_standard.Property(e => e.remark).HasMaxLength(60);

            //激励登记表
            var ebonus = modelBuilder.Entity<Ebonus>();
            ebonus.ToTable("bonus");
            ebonus.Property(e => e.major_kind_id).HasMaxLength(20);
            ebonus.Property(e => e.major_kind_name).HasMaxLength(60);
            ebonus.Property(e => e.major_id).HasMaxLength(20);
            ebonus.Property(e => e.major_name).HasMaxLength(60);
            ebonus.Property(e => e.human_id).HasMaxLength(30);
            ebonus.Property(e => e.human_name).HasMaxLength(60);
            ebonus.Property(e => e.bonus_item).HasMaxLength(60);
            ebonus.Property(e => e.bonus_worth);
            ebonus.Property(e => e.bonus_degree).HasMaxLength(60);
            ebonus.Property(e => e.remark).HasMaxLength(60);
            ebonus.Property(e => e.register).HasMaxLength(60);
            ebonus.Property(e => e.checker).HasMaxLength(60);
            ebonus.Property(e => e.regist_time);
            ebonus.Property(e => e.check_time);
            ebonus.Property(e => e.check_status).HasMaxLength(20);

            //培训登记表   
            var etraining = modelBuilder.Entity<Etraining>();
            etraining.ToTable("training");
            etraining.Property(e => e.major_kind_id).HasMaxLength(20);
            etraining.Property(e => e.major_kind_name).HasMaxLength(60);
            etraining.Property(e => e.major_id).HasMaxLength(20);
            etraining.Property(e => e.major_name).HasMaxLength(60);
            etraining.Property(e => e.human_id).HasMaxLength(60);
            etraining.Property(e => e.human_name).HasMaxLength(60);
            etraining.Property(e => e.training_item).HasMaxLength(60);
            etraining.Property(e => e.training_time);
            etraining.Property(e => e.training_hour).HasMaxLength(20);
            etraining.Property(e => e.training_degree).HasMaxLength(60);
            etraining.Property(e => e.register).HasMaxLength(60);
            etraining.Property(e => e.checker).HasMaxLength(60);
            etraining.Property(e => e.regist_time);
            etraining.Property(e => e.check_time);
            etraining.Property(e => e.checkstatus).HasMaxLength(20);
            etraining.Property(e => e.remark).HasMaxLength(60);

            //职位调动表
            var emajor_change = modelBuilder.Entity<Emajor_change>();
            emajor_change.ToTable("major_change");
            emajor_change.Property(e => e.first_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.first_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.second_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.second_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.third_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.third_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.major_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.major_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.major_id).HasMaxLength(20);
            emajor_change.Property(e => e.major_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_first_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.new_first_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_second_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.new_second_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_third_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.new_third_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_major_kind_id).HasMaxLength(20);
            emajor_change.Property(e => e.new_major_kind_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_major_id).HasMaxLength(30);
            emajor_change.Property(e => e.new_major_name).HasMaxLength(60);
            emajor_change.Property(e => e.human_id).HasMaxLength(30);
            emajor_change.Property(e => e.human_name).HasMaxLength(60);
            emajor_change.Property(e => e.salary_standard_id).HasMaxLength(30);
            emajor_change.Property(e => e.salary_standard_name).HasMaxLength(60);
            emajor_change.Property(e => e.salary_sum);
            emajor_change.Property(e => e.new_salary_standard_id).HasMaxLength(30);
            emajor_change.Property(e => e.new_salary_standard_name).HasMaxLength(60);
            emajor_change.Property(e => e.new_salary_sum);
            emajor_change.Property(e => e.change_reason).HasMaxLength(60);
            emajor_change.Property(e => e.check_reason).HasMaxLength(60);
            emajor_change.Property(e => e.check_status).HasMaxLength(20);
            emajor_change.Property(e => e.register).HasMaxLength(60);
            emajor_change.Property(e => e.checker).HasMaxLength(60);
            emajor_change.Property(e => e.regist_time);
            emajor_change.Property(e => e.check_time);

            //薪酬发放登记表
            var eg = modelBuilder.Entity<ESalary_grant>();
            eg.ToTable("salary_grant");
            eg.Property(e => e.salary_grant_id).HasMaxLength(50);
            eg.Property(e => e.salary_standard_id).HasMaxLength(50);
            eg.Property(e => e.first_kind_id).HasMaxLength(50);
            eg.Property(e => e.first_kind_name).HasMaxLength(50);
            eg.Property(e => e.second_kind_id).HasMaxLength(50);
            eg.Property(e => e.second_kind_name).HasMaxLength(50);
            eg.Property(e => e.third_kind_id).HasMaxLength(50);
            eg.Property(e => e.third_kind_name).HasMaxLength(50);
            eg.Property(e => e.human_amount).HasMaxLength(50);
            eg.Property(e => e.salary_standard_sum);
            eg.Property(e => e.salary_paid_sum);
            eg.Property(e => e.register).HasMaxLength(50);
            eg.Property(e => e.regist_time);
            eg.Property(e => e.checker).HasMaxLength(50);
            eg.Property(e => e.check_time);
            eg.Property(e => e.check_status).HasMaxLength(50);


            //薪酬发放详细信息
            var esg = modelBuilder.Entity<ESalary_grant_details>();
            esg.ToTable("salary_grant_details");
            esg.Property(e => e.salary_grant_id).HasMaxLength(50);
            esg.Property(e => e.human_id).HasMaxLength(50);
            esg.Property(e => e.human_name).HasMaxLength(50);
            esg.Property(e => e.bouns_sum);
            esg.Property(e => e.sale_sum);
            esg.Property(e => e.deduct_sum);
            esg.Property(e => e.salary_standard_sum);
            esg.Property(e => e.salary_paid_sum);

            //职位发表登记表
            var emr = modelBuilder.Entity<EEngage_major_release>();
            emr.ToTable("engage_major_release");
            emr.Property(e => e.first_kind_id).HasMaxLength(50);
            emr.Property(e => e.first_kind_name).HasMaxLength(50);
            emr.Property(e => e.second_kind_id).HasMaxLength(50);
            emr.Property(e => e.second_kind_name).HasMaxLength(50);
            emr.Property(e => e.third_kind_id).HasMaxLength(50);
            emr.Property(e => e.third_kind_name).HasMaxLength(50);
            emr.Property(e => e.major_kind_id).HasMaxLength(50);
            emr.Property(e => e.major_kind_name).HasMaxLength(50);
            emr.Property(e => e.major_id).HasMaxLength(50);
            emr.Property(e => e.major_name).HasMaxLength(50);
            emr.Property(e => e.human_amount).HasMaxLength(50);
            emr.Property(e => e.engage_type).HasMaxLength(50);
            emr.Property(e => e.deadline).HasMaxLength(50);
            emr.Property(e => e.register).HasMaxLength(50);
            emr.Property(e => e.changer).HasMaxLength(50);
            emr.Property(e => e.regist_time);
            emr.Property(e => e.change_time);
            emr.Property(e => e.major_describe).HasMaxLength(50);
            emr.Property(e => e.engage_required).HasMaxLength(50);

            //试卷详细信息
            var eed = modelBuilder.Entity<EEngage_exam_details>();
            eed.ToTable("engage_exam_details");
            eed.Property(e => e.exam_number).HasMaxLength(50);
            eed.Property(e => e.first_kind_id).HasMaxLength(50);
            eed.Property(e => e.first_kind_name).HasMaxLength(50);
            eed.Property(e => e.second_kind_id).HasMaxLength(50);
            eed.Property(e => e.second_kind_name).HasMaxLength(50);
            eed.Property(e => e.question_amount).HasMaxLength(50);

            //试卷登记表
            var eem = modelBuilder.Entity<EEngage_exam>();
            eem.ToTable("engage_exam");
            eem.Property(e => e.exam_number).HasMaxLength(50);
            eem.Property(e => e.major_kind_id).HasMaxLength(50);
            eem.Property(e => e.major_kind_name).HasMaxLength(50);
            eem.Property(e => e.major_id).HasMaxLength(50);
            eem.Property(e => e.major_name).HasMaxLength(50);
            eem.Property(e => e.register).HasMaxLength(50);
            eem.Property(e => e.regist_time);
            eem.Property(e => e.limite_time);


            //考试答题登记表
            var ea = modelBuilder.Entity<EEngage_answer>();
            ea.ToTable("engage_answer");
            ea.Property(e => e.answer_number).HasMaxLength(50);
            ea.Property(e => e.exam_number).HasMaxLength(50);
            ea.Property(e => e.resume_id).HasMaxLength(50);
            ea.Property(e => e.interview_id).HasMaxLength(50);
            ea.Property(e => e.human_name).HasMaxLength(50);
            ea.Property(e => e.human_idcard).HasMaxLength(50);
            ea.Property(e => e.major_kind_id).HasMaxLength(50);
            ea.Property(e => e.major_kind_name).HasMaxLength(50);
            ea.Property(e => e.major_id).HasMaxLength(50);
            ea.Property(e => e.major_name).HasMaxLength(50);
            ea.Property(e => e.test_time);
            ea.Property(e => e.use_time);
            ea.Property(e => e.total_point).HasMaxLength(50);


            //考试答题详细信息
            var ead = modelBuilder.Entity<EEngage_answer_details>();
            ead.ToTable("engage_answer_details");
            ead.Property(e => e.answer_number).HasMaxLength(50);
            ead.Property(e => e.subject_id).HasMaxLength(50);
            ead.Property(e => e.answer).HasMaxLength(50);

            //试题题库登记表
            var es = modelBuilder.Entity<EEngage_subjects>();
            es.ToTable("engage_subjects");
            es.Property(e => e.first_kind_id).HasMaxLength(50);
            es.Property(e => e.first_kind_name).HasMaxLength(50);
            es.Property(e => e.second_kind_id).HasMaxLength(50);
            es.Property(e => e.second_kind_name).HasMaxLength(50);
            es.Property(e => e.register).HasMaxLength(50);
            es.Property(e => e.regist_time);
            es.Property(e => e.derivation).HasMaxLength(50);
            es.Property(e => e.content).HasMaxLength(50);
            es.Property(e => e.key_a).HasMaxLength(50);
            es.Property(e => e.key_b).HasMaxLength(50);
            es.Property(e => e.key_c).HasMaxLength(50);
            es.Property(e => e.key_d).HasMaxLength(50);
            es.Property(e => e.key_e).HasMaxLength(50);
            es.Property(e => e.correct_key).HasMaxLength(50);
            es.Property(e => e.changer).HasMaxLength(50);
            es.Property(e => e.change_time);

            //简历管理
            var er = modelBuilder.Entity<EEngage_resume>();
            er.ToTable("engage_resume");
            er.Property(e => e.human_name).HasMaxLength(50);
            er.Property(e => e.engage_type).HasMaxLength(50);
            er.Property(e => e.human_address).HasMaxLength(50);
            er.Property(e => e.human_postcode).HasMaxLength(50);
            er.Property(e => e.human_major_kind_id).HasMaxLength(50);
            er.Property(e => e.human_major_kind_name).HasMaxLength(50);
            er.Property(e => e.human_major_id).HasMaxLength(50);
            er.Property(e => e.human_major_name).HasMaxLength(50);
            er.Property(e => e.human_telephone).HasMaxLength(50);
            er.Property(e => e.human_homephone).HasMaxLength(50);
            er.Property(e => e.human_mobilephone).HasMaxLength(50);
            er.Property(e => e.human_email).HasMaxLength(50);
            er.Property(e => e.human_hobby).HasMaxLength(50);
            er.Property(e => e.human_specility).HasMaxLength(50);
            er.Property(e => e.human_sex).HasMaxLength(50);
            er.Property(e => e.human_religion).HasMaxLength(50);
            er.Property(e => e.human_party).HasMaxLength(50);
            er.Property(e => e.human_nationality).HasMaxLength(50);
            er.Property(e => e.human_race).HasMaxLength(50);
            er.Property(e => e.human_birthday).HasMaxLength(50);
            er.Property(e => e.human_age).HasMaxLength(50);
            er.Property(e => e.human_educated_degree).HasMaxLength(50);
            er.Property(e => e.human_educated_years).HasMaxLength(50);
            er.Property(e => e.human_educated_major).HasMaxLength(50);
            er.Property(e => e.human_college).HasMaxLength(50);
            er.Property(e => e.human_idcard).HasMaxLength(50);
            er.Property(e => e.human_birthplace).HasMaxLength(50);
            er.Property(e => e.demand_salary_standard).HasMaxLength(50);
            er.Property(e => e.human_history_records).HasMaxLength(50);
            er.Property(e => e.remark).HasMaxLength(50);
            er.Property(e => e.recomandation).HasMaxLength(50);
            er.Property(e => e.human_picture).HasMaxLength(50);
            er.Property(e => e.attachment_name).HasMaxLength(50);
            er.Property(e => e.check_status).HasMaxLength(50);
            er.Property(e => e.register).HasMaxLength(50);
            er.Property(e => e.regist_time);
            er.Property(e => e.checker).HasMaxLength(50);
            er.Property(e => e.check_time);
            er.Property(e => e.interview_status).HasMaxLength(50);
            er.Property(e => e.total_points).HasMaxLength(50);
            er.Property(e => e.test_amount).HasMaxLength(50);
            er.Property(e => e.test_checker).HasMaxLength(50);
            er.Property(e => e.test_check_time);
            er.Property(e => e.pass_register).HasMaxLength(50);
            er.Property(e => e.pass_regist_time);
            er.Property(e => e.pass_checker).HasMaxLength(50);
            er.Property(e => e.pass_check_time);
            er.Property(e => e.pass_check_status).HasMaxLength(50);
            er.Property(e => e.pass_checkComment).HasMaxLength(50);
            er.Property(e => e.pass_passComment).HasMaxLength(50);

            //面试表
            var ee = modelBuilder.Entity<EEngage_interview>();
            ee.ToTable("engage_interview");
            ee.Property(e => e.human_name).HasMaxLength(50);
            ee.Property(e => e.interview_amount).HasMaxLength(50);
            ee.Property(e => e.human_major_kind_id).HasMaxLength(50);
            ee.Property(e => e.human_major_kind_name).HasMaxLength(50);
            ee.Property(e => e.human_major_id).HasMaxLength(50);
            ee.Property(e => e.human_major_name).HasMaxLength(50);
            ee.Property(e => e.image_degree).HasMaxLength(50);
            ee.Property(e => e.native_language_degree).HasMaxLength(50);
            ee.Property(e => e.foreign_language_degree).HasMaxLength(50);
            ee.Property(e => e.response_speed_degree).HasMaxLength(50);
            ee.Property(e => e.EQ_degree).HasMaxLength(50);
            ee.Property(e => e.IQ_degree).HasMaxLength(50);
            ee.Property(e => e.multi_quality_degree).HasMaxLength(50);
            ee.Property(e => e.register).HasMaxLength(50);
            ee.Property(e => e.checker).HasMaxLength(50);
            ee.Property(e => e.registe_time);
            ee.Property(e => e.check_time);
            ee.Property(e => e.resume_id).HasMaxLength(50);
            ee.Property(e => e.result).HasMaxLength(50);
            ee.Property(e => e.interview_comment).HasMaxLength(50);
            ee.Property(e => e.check_comment).HasMaxLength(50);
            ee.Property(e => e.interview_status).HasMaxLength(50);
            ee.Property(e => e.check_status).HasMaxLength(50);
            //身份
            var sf = modelBuilder.Entity<Esf>();
            sf.ToTable("sf");
            sf.Property(e => e.user_sf).HasMaxLength(50);

        }
        //职位设置
        public DbSet<config_major> ZWSZ { get; set; }
        //职位分类设置
        public DbSet<config_major_kind> ZWFL { get; set; }
        //职称名称
        public DbSet<config_kind> config_kindMC { get; set; }
        public DbSet<users> sers { get; set; }
        public DbSet<Epower> Epower { get; set; }
        public DbSet<Esf> Esf { get; set; }
        public DbSet<EQuanXian> EQuanXian { get; set; }
        public DbSet<Econfig_file_first_kind> config_file_first_kind { get; set; }
        public DbSet<Econfig_file_second_kind> config_file_second_kind { get; set; }
        public DbSet<Econfig_file_third_kind> config_file_third_kind { get; set; }
        //职称名称
        public DbSet<config_public_char> ZWMC { get; set; }
        public DbSet<salary_standard_details> salary_standard_details { get; set; }
        public DbSet<Etraining> training { get; set; }
        //public DbSet<Esalary_standard_details> salary_standard_details { get; set; }
        public DbSet<Esalary_standard> salary_standard { get; set; }
        public DbSet<ESalary_grant_details> Salary_grant_details { get; set; }

        public DbSet<ESalary_grant> Salary_grant { get; set; }
        public DbSet<Emajor_change> major_change { get; set; }

        public DbSet<EHumanFile_dig> HumanFile_dig { get; set; }
        public DbSet<Ehuman_file> human_file { get; set; }
        public DbSet<EEngage_subjects> engage_subjects { get; set; }
        public DbSet<EEngage_resume> engage_resume { get; set; }
        public DbSet<EEngage_major_release> Engage_major_release { get; set; }
        public DbSet<EEngage_interview> Engage_interview { get; set; }
        public DbSet<EEngage_exam_details> Engage_exam_details { get; set; }
        public DbSet<EEngage_exam> Engage_exam { get; set; }
        public DbSet<EEngage_answer_details> Engage_answer_details { get; set; }
        public DbSet<EEngage_answer> Engage_answer { get; set; }
        public DbSet<Econfig_question_second_kind> config_question_second_kind { get; set; }

        public DbSet<Econfig_question_first_kind> config_question_first_kind { get; set; }
        //public DbSet<Econfig_public_char> config_public_char { get; set; }

        public DbSet<Econfig_primary_key> config_primary_key { get; set; }
        //public DbSet<Econfig_major_kind> config_major_kind { get; set; }
        //public DbSet<Econfig_major> config_major { get; set; }
        //public DbSet<Econfig_file_third_kind> config_file_third_kind { get; set; }
        //public DbSet<Econfig_file_second_kind> config_file_second_kind { get; set; }
        //public DbSet<Econfig_file_first_kind> config_file_first_kind { get; set; }
        public DbSet<Ebonus> bonus { get; set; }
    }
}
